# Maintainer:
# Contributor: damir <damir@archlinux.org>

pkgname=libnet
pkgver=1.1.6
pkgrel=1
epoch=1
pkgdesc="A library which provides API for commonly used low-level net functions"
arch=('x86_64')
url="https://github.com/libnet/libnet"
license=('BSD')
depends=('glibc' 'sh')
makedepends=('help2man' 'doxygen')
source=(https://github.com/libnet/libnet/releases/download/v${pkgver}/libnet-${pkgver}.tar.gz)
sha512sums=('a67e502b0e6957ca590e47cb50b0472dd83d622d84c62818d665d771616df91b5a8fa8fcf1040d13b7860aaabaf338152ef40f66ab97c3fc9502edb08cea0bb6')

build() {
  cd "${pkgname}-${pkgver}"
  ./configure --prefix=/usr

  make
}

package() {
  cd "${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install

  install -Dm644 doc/COPYING \
    "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
